package com.gopay.checkorder.service.task;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.gopay.checkorder.service.BcdlOrderService;
import com.gopay.checkorder.service.sentinel.BcdlOrderSentinel;

public class BcdlOrderProcesserTaskImpl implements Task {
	private final static Logger logger = LoggerFactory.getLogger(BcdlOrderProcesserTaskImpl.class);

	@Resource(name = "bcdlOrderService")
    private BcdlOrderService bcdlOrderService;
	
	private String bank;
	
	private String notifyCpsUrl;
	
	private BcdlOrderSentinel sentinel;
	
	@Override
	public void doTask() {
	    logger.info("银企直连job--开始，bank="+bank);
        bcdlOrderService.process(bank, notifyCpsUrl,sentinel);
        logger.info("银企直连job--结束，bank="+bank);
	}

	
    public void setBank(String bank) {
        this.bank = bank;
    }
    
    public void setNotifyCpsUrl(String notifyCpsUrl) {
        this.notifyCpsUrl = notifyCpsUrl;
    }

	public void setSentinel(BcdlOrderSentinel sentinel) {
		this.sentinel = sentinel;
	}
	
}
